﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="lensManager.aspx.cs" Inherits="lensManager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>镜片品名定义</title>
    <link href="css/shipping.css" rel="stylesheet" type="text/css" />
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <link href="css/cs.css" rel="stylesheet" type="text/css" />    
</head>
<body>
    <form id="form1" runat="server">
        <!--search condition -->
        <div id="searchBox">
            <span>品名:</span>
            <asp:TextBox runat="server" ID="TextBoxLensName_Q" CssClass="inputBox" />
            <span>折射率:</span>
            <asp:DropDownList ID="DropDownListrRefractive_Q" runat="server">
                <asp:ListItem Value="-1" Selected="true">全部</asp:ListItem>
                <asp:ListItem>1.499</asp:ListItem>
                <asp:ListItem>1.553</asp:ListItem>
                <asp:ListItem>1.600</asp:ListItem>
                <asp:ListItem>1.670</asp:ListItem>
                <asp:ListItem>1.740</asp:ListItem>
            </asp:DropDownList>
            <br />
            <div id="action">
                <asp:Button ID="ButtonQuery" runat="server" OnClick="ButtonQuery_Click" Text="查询"
                    CssClass="button" />
            </div>
        </div>
        <asp:Label ID="LabelResultCount" runat="server" Text=""></asp:Label><br />
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td width="70%" align="left" valign="top">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="1"
                        CellSpacing="1" BorderWidth="0px" BackColor="#C6D5DC" CssClass="biaoresult" Font-Size="small"
                        AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" PageSize="20"
                        OnRowCommand="GridView1_RowCommand">
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <EditRowStyle BackColor="#999999" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        <Columns>
                            <asp:BoundField DataField="lens_id" HeaderText="ID" />
                            <asp:TemplateField HeaderText="品名">
                                <ItemTemplate>
                                    <%# Eval("lens_name")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="lens_type" HeaderText="光型" />
                            <asp:BoundField DataField="refractive_index" HeaderText="折射率" />
                            <asp:BoundField DataField="film_color" HeaderText="膜层颜色" />
                            <asp:BoundField DataField="dispersive_coef" HeaderText="色散系数" />
                            <asp:TemplateField HeaderText="" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButtonEdit" runat="server" CausesValidation="False" Text="修改"
                                        CommandArgument='<%# Eval("lens_id") %>' CommandName="command_edit"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="visible" HeaderText="可见" />
                            <asp:TemplateField ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButtonSetVisible" runat="server" CausesValidation="False"
                                        Text="改变" CommandArgument='<%# Eval("lens_id") %>' CommandName="command_visible"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButtonDel" runat="server" CausesValidation="False" Text="删除"
                                        CommandArgument='<%# Eval("lens_id") %>' CommandName="command_del" OnClientClick="javascript:return confirm('你确认要删除吗？')"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <br />
                    <asp:LinkButton ID="LinkButtonAdd" runat="server" CausesValidation="False" Text="新增"
                        OnClick="LinkButtonAdd_Click"></asp:LinkButton>
                </td>
                <td align="left" valign="top">
                    <asp:Panel ID="PanelInput" runat="server">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="25%">
                                    ID:</td>
                                <td>
                                    <asp:Label ID="LabelLensID" runat="server"></asp:Label>
                                    <asp:TextBox ID="TextBoxCommandType" runat="server" Visible="false"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    品名:</td>
                                <td>
                                    <asp:TextBox ID="TextBoxLensName" runat="server" CssClass="input" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    光型:</td>
                                <td>
                                    <asp:DropDownList ID="DropDownListLensType" runat="server">
                                        <asp:ListItem Value="近视">近视</asp:ListItem>
                                        <asp:ListItem Value="老花">老花</asp:ListItem>
                                        <asp:ListItem Value="近视|老花">近视|老花</asp:ListItem>
                                    </asp:DropDownList></td>
                            </tr>
                            <tr>
                                <td>
                                    折射率:</td>
                                <td>
                                    <asp:DropDownList ID="DropDownListrRefractive" runat="server">
                                        <asp:ListItem Value="" Selected="true">无</asp:ListItem>
                                        <asp:ListItem>1.499</asp:ListItem>
                                        <asp:ListItem>1.553</asp:ListItem>
                                        <asp:ListItem>1.600</asp:ListItem>
                                        <asp:ListItem>1.670</asp:ListItem>
                                        <asp:ListItem>1.740</asp:ListItem>
                                    </asp:DropDownList></td>
                            </tr>
                            <tr>
                                <td>
                                    膜层颜色:</td>
                                <td>
                                    <asp:DropDownList ID="DropDownListFilm" runat="server" DataTextField="name" DataValueField="name" /></td>
                            </tr>
                            <tr>
                                <td>
                                    色散系数:</td>
                                <td>
                                    <asp:TextBox ID="TextBoxDispersive" runat="server" Width="40"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td colspan="2" align="center">
                                    <asp:Button ID="ButtonSubmit" runat="server" OnClick="ButtonSubmit_Click" Text="保存"
                                        CssClass="button" /></td>
                            </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
